package com.stone.daoimpl;
import java.util.List;

import com.stone.dao.IRankDao;
import com.stone.dao.hibernatebaseimpl.BaseDaoHibernateImpl;
import com.stone.model.Rank;

public class RankDao extends BaseDaoHibernateImpl<Rank, Long> implements IRankDao {
	
	public Rank findByType(String type){
		String sql = "from Rank rank where rank.type=" + type;
		List<Rank> list = findByQueryString(sql);
		if(list.size() == 0){
			return null;
		}else{
			return list.get(0);
		}
	}
	
}
